//
//  BWOAuthViewController.swift
//  新浪微博
//
//  Created by 冰凌天 on 2017/8/22.
//  Copyright © 2017年 冰凌天. All rights reserved.
//

import UIKit

/// 通过 webView 加载新浪微博授权页面控制器
class BWOAuthViewController: UIViewController {

    private lazy var webView = UIWebView()
    
    override func loadView() {
        view = webView
        view.backgroundColor = UIColor.white
        
        // 设置导航栏
        title = "登录新浪微博"
        // 导航栏按钮
        
        navigationItem.leftBarButtonItem = UIBarButtonItem.item(
            imageName: "navigationbar_back_withtext",
            highlightedImageName: "navigationbar_back_withtext_highlighted",
            title : "返回",
            titleColor : UIColor.color(red: 96, green: 96, blue: 96),
            highlightedTitleColor : UIColor.color(red: 253, green: 130, blue: 36),
            font : UIFont.systemFont(ofSize: 19),
            target: self,
            action: #selector(close))
    }
    
    @objc fileprivate func close() {
        dismiss(animated: true, completion: nil)
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
